<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>出库单查询</title>
    <link rel="stylesheet" href="/css/chuku.css" type="text/css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
出库管理>>出库确认
<hr>
    <div class="table" style="color: #505ca0;">
        <table border="0" cellspacing="0" cellpadding="0">
            <form action="chukudanChaxun1.do">


            <tr>
                <td style="width: 10%" ;>出库时间</td>
                <td style="width: 80%" ;>
                    <input type="date" th:value="${session.time1}" id="time1" name="time1">
                    /<input onblur="change()" type="date" th:value="${session.time2}" id="time2" name="time2"><label id="lable"></label>
                </td>
            </tr>
            <tr>
                <td style="width: 10%" ;>出库单号</td>
                <td>
                    <input type="text" id="billId" th:value="${session.billId}" name="billId">
                </td>
            </tr>
            <tr>
                <td style="width: 10%" ;>货主名</td>
                <td>
                    <input type="text" id="custName" th:value="${session.custName}" name="custName">
                </td>
            </tr>
                <input type="hidden" name="pageRows">
                <input type="hidden" name="page">
            <tr>
                <td></td>
                <td><input type="submit" id="submit" value="查询" /></td>
            </tr>

            </form>
        </table>
    </div>
<div class="table1" style="color: #53a058;">
    <table border="0" cellspacing="0" cellpadding="0" style="background-color: #aedfb6;" th:if="${session.pageInfo2!=null}">
        <tr>
            <td>出库单号</td>
            <td>结算员</td>
            <td>货主</td>
            <td>业务时间</td>
            <td>应收款</td>
            <td>实际收款</td>
            <td>库存费</td>
        </tr>
            <tr th:each="every:${session.pageInfo2.getList()}">
                <td th:text="${every.get('billID')} == null ? 'null' : ${every.get('billID')}"></td>
                <td th:text="${every.get('billTransactor')} == null ? 'null' : ${every.get('billTransactor')}"></td>
                <td th:text="${every.get('custName')} == null ? 'null' : ${every.get('custName')}"></td>
                <td th:text="${every.get('billDate')} == null ? 'null' : ${every.get('billDate')}"></td>
                <td th:text="${every.get('billPayable')} == null ? 'null' : ${every.get('billPayable')}"></td>
                <td th:text="${every.get('billPaid')} == null ? 'null' : ${every.get('billPaid')}"></td>
                <td th:text="${every.get('billFeeOther')} == null ? 'null' : ${every.get('billFeeOther')}"></td>
            </tr>
        <button th:value="${session.pageInfo2.getPageNum()>1?session.pageInfo2.getPageNum()-1:session.pageInfo2.getPageNum()}" onclick="lastpage(this.value)">上一页</button>
        <select onchange="pageRows(this.value)" id="select" >
            <option>请选择</option>
            <option value="5"  th:selected="${session.pageInfo2.pageSize == 5}">5</option>
            <option value="10" th:selected="${session.pageInfo2.pageSize == 10}">10</option>
            <option value="15" th:selected="${session.pageInfo2.pageSize == 15}">15</option>
        </select>
        <button th:value="${session.pageInfo2.getPageNum()<session.pageInfo2.getPages()?session.pageInfo2.getPageNum()+1:session.pageInfo2.getPageNum()}" onclick="lastpage(this.value)">下一页</button></tr>
    </table>
</div>
</body>
<script>
        function change() {
            var time1 = $("#time1").val();
            var time2 = $("#time2").val();
            if (time1>time2) {
                $("#lable").html("后面的不能小于前边的时间")
            }
        }
        function pageRows(pageRows){
            var custName = $("#custName").val();
            var billId = $("#billId").val();
            var time1 = $("#time1").val();
            var time2 = $("#time2").val();
            var page = "";
            window.location = "chukudanChaxun1.do?page="+page+"&custName="+custName+"&billId="+billId+"&time1="+time1+"&time2="+time2+"&pageRows="+pageRows;
        }
        function lastpage(page) {
            var custName = $("#custName").val();
            var billId = $("#billId").val();
            var time1 = $("#time1").val();
            var time2 = $("#time2").val();
            var select = $("#select").val();
            window.location = "chukudanChaxun1.do?page="+page+"&custName="+custName+"&billId="+billId+"&time1="+time1+"&time2="+time2+"&pageRows="+select;
        }
</script>
</html>